<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Generic Attribute Profile (GATT) Server.</title>
<link href="tabs.css" rel="stylesheet" type="text/css" />
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="alias.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="alias.js"></script>

<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>


<script type="text/javascript">
  jQuery(document).ready(function () {
    if(gref){ // Number all _img and _table classes
      gref();
    }
  });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">nRF51822 BLE SDK
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('group___b_l_e___g_a_t_t_s.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#groups">Modules</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Generic Attribute Profile (GATT) Server.</div>  </div>
<div class="ingroups"><a class="el" href="group__s110.html">S110 SoftDevice</a></div></div>
<div class="contents">

<p>Definitions and prototypes for the GATTS interface.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__attr__md__t.html">ble_gatts_attr_md_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Attribute metadata.  <a href="structble__gatts__attr__md__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__attr__t.html">ble_gatts_attr_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GATT Attribute.  <a href="structble__gatts__attr__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__attr__context__t.html">ble_gatts_attr_context_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GATT Attribute Context.  <a href="structble__gatts__attr__context__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__char__properties__t.html">ble_gatts_char_properties_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GATT Characteristic Properties.  <a href="structble__gatts__char__properties__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__char__pf__t.html">ble_gatts_char_pf_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GATT Characteristic Presentation Format.  <a href="structble__gatts__char__pf__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__char__md__t.html">ble_gatts_char_md_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GATT Characteristic Medatadata.  <a href="structble__gatts__char__md__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__char__handles__t.html">ble_gatts_char_handles_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GATT Characteristic Definition Handles.  <a href="structble__gatts__char__handles__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__hvx__params__t.html">ble_gatts_hvx_params_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GATT HVx parameters.  <a href="structble__gatts__hvx__params__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__rw__op__reply__params__t.html">ble_gatts_rw_op_reply_params_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GATT Deferred/Persistent reply parameters.  <a href="structble__gatts__rw__op__reply__params__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__evt__mtu__update__t.html">ble_gatts_evt_mtu_update_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Event structure for BLE_GATTS_EVT_MTU_UPDATE.  <a href="structble__gatts__evt__mtu__update__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__evt__write__t.html">ble_gatts_evt_write_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Event structure for BLE_GATTS_EVT_WRITE.  <a href="structble__gatts__evt__write__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__evt__read__op__t.html">ble_gatts_evt_read_op_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Event structure for BLE_GATTS_EVT_READ_OP_REQUEST.  <a href="structble__gatts__evt__read__op__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__evt__sys__attr__missing__t.html">ble_gatts_evt_sys_attr_missing_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Event structure for BLE_GATTS_EVT_SYS_ATTR_MISSING.  <a href="structble__gatts__evt__sys__attr__missing__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__evt__hvc__t.html">ble_gatts_evt_hvc_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Event structure for BLE_GATTS_EVT_HVC.  <a href="structble__gatts__evt__hvc__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__gatts__evt__t.html">ble_gatts_evt_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GATT Server event callback event structure.  <a href="structble__gatts__evt__t.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="groups"></a>
Modules</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___e_r_r_o_r_s___g_a_t_t_s.html">SVC return values specific to GATTS.</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s___s_v_c___t_y_p_e_s.html">GATT Server Service Types.</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s___a_t_t_r___t_y_p_e_s.html">GATT Server Attribute Types.</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s___o_p_s.html">GATT Server Operations</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t___c_p_f___n_a_m_e_s_p_a_c_e_s.html">GATT Bluetooth Namespaces.</a></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga69b579663f889c0ce87a8931b51048b4"></a><!-- doxytag: member="BLE_GATTS::GATT_RX_MTU" ref="ga69b579663f889c0ce87a8931b51048b4" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#ga69b579663f889c0ce87a8931b51048b4">GATT_RX_MTU</a>&#160;&#160;&#160;23</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Only the default MTU size of 23 is currently supported. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa16a29908fc63343706f56913be51ec1"></a><!-- doxytag: member="BLE_GATTS::BLE_GATTS_HANDLE_INVALID" ref="gaa16a29908fc63343706f56913be51ec1" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#gaa16a29908fc63343706f56913be51ec1">BLE_GATTS_HANDLE_INVALID</a>&#160;&#160;&#160;0x0000</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Invalid Attribute Handle. <br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6830ed97ca69e65de58dc262c36de5c7"></a><!-- doxytag: member="BLE_GATTS::ble_gatts_evt_write_op_t" ref="ga6830ed97ca69e65de58dc262c36de5c7" args="" -->
typedef <a class="el" href="structble__gatts__evt__read__op__t.html">ble_gatts_evt_read_op_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#ga6830ed97ca69e65de58dc262c36de5c7">ble_gatts_evt_write_op_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Event structure for BLE_GATTS_EVT_WRITE_OP_REQUEST. <br/></td></tr>
<tr><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
&#160;&#160;<a class="el" href="group___b_l_e___g_a_t_t_s.html#ggaaf105ae5beaca1dee30ae54530691fceaf1fd96039a3e8897746c941ba27c0790">SVC_BLE_GATTS_DB_LOAD</a> =  BLE_GATTS_SVC_BASE, 
<a class="el" href="group___b_l_e___g_a_t_t_s.html#ggaaf105ae5beaca1dee30ae54530691fcea78cd57d15505ff6309b45a9ac6fdd055">SVC_BLE_GATTS_SERVICE_ADD</a>, 
<a class="el" href="group___b_l_e___g_a_t_t_s.html#ggaaf105ae5beaca1dee30ae54530691fcea4dc7cf81a0c1475646ced4d7b31c51eb">SVC_BLE_GATTS_INCLUDE_ADD</a>, 
<a class="el" href="group___b_l_e___g_a_t_t_s.html#ggaaf105ae5beaca1dee30ae54530691fcea8be599bb11323fbd1fd59612b61dded8">SVC_BLE_GATTS_CHARACTERISTIC_ADD</a>, 
<br/>
&#160;&#160;<a class="el" href="group___b_l_e___g_a_t_t_s.html#ggaaf105ae5beaca1dee30ae54530691fcea1785845a5e8428082c576883aa872cd9">SVC_BLE_GATTS_DESCRIPTOR_ADD</a>, 
<a class="el" href="group___b_l_e___g_a_t_t_s.html#ggaaf105ae5beaca1dee30ae54530691fcea42be96066fca377cf4ad929ec4125a58">SVC_BLE_GATTS_MD_SET</a>, 
<a class="el" href="group___b_l_e___g_a_t_t_s.html#ggaaf105ae5beaca1dee30ae54530691fceaba69cc87d4420099fe195c2f9bf156e8">SVC_BLE_GATTS_MD_GET</a>, 
<a class="el" href="group___b_l_e___g_a_t_t_s.html#ggaaf105ae5beaca1dee30ae54530691fcea5ccb34a3ff55e799cc1706af14be204e">SVC_BLE_GATTS_VALUE_SET</a>, 
<br/>
&#160;&#160;<a class="el" href="group___b_l_e___g_a_t_t_s.html#ggaaf105ae5beaca1dee30ae54530691fcea70c9793acebfb7089f8df93a592fbf5d">SVC_BLE_GATTS_VALUE_GET</a>, 
<a class="el" href="group___b_l_e___g_a_t_t_s.html#ggaaf105ae5beaca1dee30ae54530691fcea0f836dda706fe9ef94c5501ffa441d77">SVC_BLE_GATTS_HVX</a>, 
<a class="el" href="group___b_l_e___g_a_t_t_s.html#ggaaf105ae5beaca1dee30ae54530691fceab9669d199e45661740f25ac9711c4608">SVC_BLE_GATTS_RW_OP_REPLY</a>, 
<a class="el" href="group___b_l_e___g_a_t_t_s.html#ggaaf105ae5beaca1dee30ae54530691fceaafad37ccc8a8e65c9d138c9444e0496e">SVC_BLE_GATTS_SYS_ATTR_SET</a>, 
<br/>
&#160;&#160;<a class="el" href="group___b_l_e___g_a_t_t_s.html#ggaaf105ae5beaca1dee30ae54530691fcea489e505d006457b2a56f8777b5a03d31">SVC_BLE_GATTS_SYS_ATTR_GET</a>
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GATTS API SVC numbers.  <a href="group___b_l_e___g_a_t_t_s.html#gaaf105ae5beaca1dee30ae54530691fce">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
&#160;&#160;<a class="el" href="group___b_l_e___g_a_t_t_s.html#gga80155586fa275b28773c9b203f52cabaafb47d2bdc544975bfef8f8ee34967077">BLE_GATTS_EVT_MTU_UPDATE</a> =  BLE_GATTS_EVT_BASE, 
<a class="el" href="group___b_l_e___g_a_t_t_s.html#gga80155586fa275b28773c9b203f52cabaaa68b7764f5264ff092d2ad17851355ed">BLE_GATTS_EVT_WRITE</a>, 
<a class="el" href="group___b_l_e___g_a_t_t_s.html#gga80155586fa275b28773c9b203f52cabaa101468a7ee24062a93a4fbdb10773a66">BLE_GATTS_EVT_READ_OP_REQUEST</a>, 
<a class="el" href="group___b_l_e___g_a_t_t_s.html#gga80155586fa275b28773c9b203f52cabaa76843cf527e6056588cee336200c960c">BLE_GATTS_EVT_WRITE_OP_REQUEST</a>, 
<br/>
&#160;&#160;<a class="el" href="group___b_l_e___g_a_t_t_s.html#gga80155586fa275b28773c9b203f52cabaae3776204f11a583e105aed0e477601da">BLE_GATTS_EVT_SYS_ATTR_MISSING</a>, 
<a class="el" href="group___b_l_e___g_a_t_t_s.html#gga80155586fa275b28773c9b203f52cabaaf6a065c5c7e0682989ddd6cc557e0ffa">BLE_GATTS_EVT_HVC</a>
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GATT Server Event IDs.  <a href="group___b_l_e___g_a_t_t_s.html#ga80155586fa275b28773c9b203f52caba">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#ga49a333294ed30895dfdc8b699b41e07c">ble_gatts_db_load</a> (uint32_t len, uint8_t const *const p_data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Load a preconfigured GATT attribute database.  <a href="#ga49a333294ed30895dfdc8b699b41e07c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#ga5e8270fe6dfa01e446be17b48fe81e2a">ble_gatts_service_add</a> (uint8_t type, <a class="el" href="structble__uuid__t.html">ble_uuid_t</a> const *const p_uuid, uint16_t *const p_handle)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a service declaration to the local server database.  <a href="#ga5e8270fe6dfa01e446be17b48fe81e2a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#ga553f8deef66ea239ced4fe7efc82106b">ble_gatts_include_add</a> (uint16_t service_handle, uint16_t inc_svc_handle, uint16_t *const p_include_handle)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add an include declaration to the local server database.  <a href="#ga553f8deef66ea239ced4fe7efc82106b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#gae4a1d9149f4531d66d06bf289886106d">ble_gatts_characteristic_add</a> (uint16_t service_handle, <a class="el" href="structble__gatts__char__md__t.html">ble_gatts_char_md_t</a> const *const p_char_md, <a class="el" href="structble__gatts__attr__t.html">ble_gatts_attr_t</a> const *const p_attr_char_value, <a class="el" href="structble__gatts__char__handles__t.html">ble_gatts_char_handles_t</a> *const p_handles)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a characteristic declaration, a characteristic value declaration and optional characteristic descriptor declarations to the local server database.  <a href="#gae4a1d9149f4531d66d06bf289886106d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#ga4bb7f2d804e7416d47ba64f434ac1243">ble_gatts_descriptor_add</a> (uint16_t char_handle, <a class="el" href="structble__gatts__attr__t.html">ble_gatts_attr_t</a> const *const p_attr, uint16_t *const p_handle)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a descriptor to the local server database.  <a href="#ga4bb7f2d804e7416d47ba64f434ac1243"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#gafa770e6b8477caf6d46296fe46dd949e">ble_gatts_md_set</a> (uint16_t handle, <a class="el" href="structble__gatts__attr__md__t.html">ble_gatts_attr_md_t</a> const *const p_attr_md)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the metadata for a given attribute.  <a href="#gafa770e6b8477caf6d46296fe46dd949e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#gad08012420fc5b8b7dbfd2ced37ab8e44">ble_gatts_md_get</a> (uint16_t handle, <a class="el" href="structble__gatts__attr__md__t.html">ble_gatts_attr_md_t</a> *const p_attr_md)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the metadata for a given attribute.  <a href="#gad08012420fc5b8b7dbfd2ced37ab8e44"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#ga4267755972361d620ae47d791feec4a5">ble_gatts_value_set</a> (uint16_t handle, uint16_t offset, uint16_t *const p_len, uint8_t const *const p_value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the value of a given attribute.  <a href="#ga4267755972361d620ae47d791feec4a5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#ga9112e57e30d9d78b9c5682c55f1b502e">ble_gatts_value_get</a> (uint16_t handle, uint16_t offset, uint16_t *const p_len, uint8_t *const p_data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the value of a given attribute.  <a href="#ga9112e57e30d9d78b9c5682c55f1b502e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#gaab41731020dbcc6b9b561d8129689308">ble_gatts_hvx</a> (uint16_t conn_handle, <a class="el" href="structble__gatts__hvx__params__t.html">ble_gatts_hvx_params_t</a> const *const p_hvx_params)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Notify or Indicate an attribute value.  <a href="#gaab41731020dbcc6b9b561d8129689308"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#ga6a775b4839508c4ea02d38589980e9f4">ble_gatts_rw_op_reply</a> (uint16_t conn_handle, <a class="el" href="structble__gatts__rw__op__reply__params__t.html">ble_gatts_rw_op_reply_params_t</a> const *const p_rw_op_reply_params)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Respond to a request for a deferred/persistent attribute valeu.  <a href="#ga6a775b4839508c4ea02d38589980e9f4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#ga65ae169e49530eb2fa4bf73053060a13">ble_gatts_sys_attr_set</a> (uint16_t conn_handle, uint8_t const *const p_sys_attr_data, uint16_t len)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Update persistent system attribute info.  <a href="#ga65ae169e49530eb2fa4bf73053060a13"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___b_l_e___g_a_t_t_s.html#gaef948f6aafa9e8a728a948bec76e8208">ble_gatts_sys_attr_get</a> (uint16_t conn_handle, uint8_t *const p_sys_attr_data, uint16_t *const p_len)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve persistent system attribute info from softdevice.  <a href="#gaef948f6aafa9e8a728a948bec76e8208"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Definitions and prototypes for the GATTS interface. </p>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="gaaf105ae5beaca1dee30ae54530691fce"></a><!-- doxytag: member="ble_gatts.h::@16" ref="gaaf105ae5beaca1dee30ae54530691fce" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>GATTS API SVC numbers. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fceaf1fd96039a3e8897746c941ba27c0790"></a><!-- doxytag: member="SVC_BLE_GATTS_DB_LOAD" ref="ggaaf105ae5beaca1dee30ae54530691fceaf1fd96039a3e8897746c941ba27c0790" args="" -->SVC_BLE_GATTS_DB_LOAD</em>&nbsp;</td><td>
<p>Load an attribute database. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fcea78cd57d15505ff6309b45a9ac6fdd055"></a><!-- doxytag: member="SVC_BLE_GATTS_SERVICE_ADD" ref="ggaaf105ae5beaca1dee30ae54530691fcea78cd57d15505ff6309b45a9ac6fdd055" args="" -->SVC_BLE_GATTS_SERVICE_ADD</em>&nbsp;</td><td>
<p>Add a service. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fcea4dc7cf81a0c1475646ced4d7b31c51eb"></a><!-- doxytag: member="SVC_BLE_GATTS_INCLUDE_ADD" ref="ggaaf105ae5beaca1dee30ae54530691fcea4dc7cf81a0c1475646ced4d7b31c51eb" args="" -->SVC_BLE_GATTS_INCLUDE_ADD</em>&nbsp;</td><td>
<p>Add an included service. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fcea8be599bb11323fbd1fd59612b61dded8"></a><!-- doxytag: member="SVC_BLE_GATTS_CHARACTERISTIC_ADD" ref="ggaaf105ae5beaca1dee30ae54530691fcea8be599bb11323fbd1fd59612b61dded8" args="" -->SVC_BLE_GATTS_CHARACTERISTIC_ADD</em>&nbsp;</td><td>
<p>Add a characteristic. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fcea1785845a5e8428082c576883aa872cd9"></a><!-- doxytag: member="SVC_BLE_GATTS_DESCRIPTOR_ADD" ref="ggaaf105ae5beaca1dee30ae54530691fcea1785845a5e8428082c576883aa872cd9" args="" -->SVC_BLE_GATTS_DESCRIPTOR_ADD</em>&nbsp;</td><td>
<p>Add a generic attribute. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fcea42be96066fca377cf4ad929ec4125a58"></a><!-- doxytag: member="SVC_BLE_GATTS_MD_SET" ref="ggaaf105ae5beaca1dee30ae54530691fcea42be96066fca377cf4ad929ec4125a58" args="" -->SVC_BLE_GATTS_MD_SET</em>&nbsp;</td><td>
<p>Set attribute metadata. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fceaba69cc87d4420099fe195c2f9bf156e8"></a><!-- doxytag: member="SVC_BLE_GATTS_MD_GET" ref="ggaaf105ae5beaca1dee30ae54530691fceaba69cc87d4420099fe195c2f9bf156e8" args="" -->SVC_BLE_GATTS_MD_GET</em>&nbsp;</td><td>
<p>Get attribute metadata. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fcea5ccb34a3ff55e799cc1706af14be204e"></a><!-- doxytag: member="SVC_BLE_GATTS_VALUE_SET" ref="ggaaf105ae5beaca1dee30ae54530691fcea5ccb34a3ff55e799cc1706af14be204e" args="" -->SVC_BLE_GATTS_VALUE_SET</em>&nbsp;</td><td>
<p>Set an attribute value. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fcea70c9793acebfb7089f8df93a592fbf5d"></a><!-- doxytag: member="SVC_BLE_GATTS_VALUE_GET" ref="ggaaf105ae5beaca1dee30ae54530691fcea70c9793acebfb7089f8df93a592fbf5d" args="" -->SVC_BLE_GATTS_VALUE_GET</em>&nbsp;</td><td>
<p>Get an attribute value. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fcea0f836dda706fe9ef94c5501ffa441d77"></a><!-- doxytag: member="SVC_BLE_GATTS_HVX" ref="ggaaf105ae5beaca1dee30ae54530691fcea0f836dda706fe9ef94c5501ffa441d77" args="" -->SVC_BLE_GATTS_HVX</em>&nbsp;</td><td>
<p>Handle Value Notification or Indication. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fceab9669d199e45661740f25ac9711c4608"></a><!-- doxytag: member="SVC_BLE_GATTS_RW_OP_REPLY" ref="ggaaf105ae5beaca1dee30ae54530691fceab9669d199e45661740f25ac9711c4608" args="" -->SVC_BLE_GATTS_RW_OP_REPLY</em>&nbsp;</td><td>
<p>Reply to a request for deferred/persistent attribute request. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fceaafad37ccc8a8e65c9d138c9444e0496e"></a><!-- doxytag: member="SVC_BLE_GATTS_SYS_ATTR_SET" ref="ggaaf105ae5beaca1dee30ae54530691fceaafad37ccc8a8e65c9d138c9444e0496e" args="" -->SVC_BLE_GATTS_SYS_ATTR_SET</em>&nbsp;</td><td>
<p>Set the persistent system attributes for a connection </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fcea489e505d006457b2a56f8777b5a03d31"></a><!-- doxytag: member="SVC_BLE_GATTS_SYS_ATTR_GET" ref="ggaaf105ae5beaca1dee30ae54530691fcea489e505d006457b2a56f8777b5a03d31" args="" -->SVC_BLE_GATTS_SYS_ATTR_GET</em>&nbsp;</td><td>
<p>Get updated persistent system attributes after terminating a connection </p>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="ble__gatts_8h_source.html#l00028">28</a> of file <a class="el" href="ble__gatts_8h_source.html">ble_gatts.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga80155586fa275b28773c9b203f52caba"></a><!-- doxytag: member="ble_gatts.h::@17" ref="ga80155586fa275b28773c9b203f52caba" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>GATT Server Event IDs. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaafb47d2bdc544975bfef8f8ee34967077"></a><!-- doxytag: member="BLE_GATTS_EVT_MTU_UPDATE" ref="gga80155586fa275b28773c9b203f52cabaafb47d2bdc544975bfef8f8ee34967077" args="" -->BLE_GATTS_EVT_MTU_UPDATE</em>&nbsp;</td><td>
<p>MTU Update. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaaa68b7764f5264ff092d2ad17851355ed"></a><!-- doxytag: member="BLE_GATTS_EVT_WRITE" ref="gga80155586fa275b28773c9b203f52cabaaa68b7764f5264ff092d2ad17851355ed" args="" -->BLE_GATTS_EVT_WRITE</em>&nbsp;</td><td>
<p>Write operation performed. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaa101468a7ee24062a93a4fbdb10773a66"></a><!-- doxytag: member="BLE_GATTS_EVT_READ_OP_REQUEST" ref="gga80155586fa275b28773c9b203f52cabaa101468a7ee24062a93a4fbdb10773a66" args="" -->BLE_GATTS_EVT_READ_OP_REQUEST</em>&nbsp;</td><td>
<p>Deferred/Persistent Read. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaa76843cf527e6056588cee336200c960c"></a><!-- doxytag: member="BLE_GATTS_EVT_WRITE_OP_REQUEST" ref="gga80155586fa275b28773c9b203f52cabaa76843cf527e6056588cee336200c960c" args="" -->BLE_GATTS_EVT_WRITE_OP_REQUEST</em>&nbsp;</td><td>
<p>Deferred/Persistent Write. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaae3776204f11a583e105aed0e477601da"></a><!-- doxytag: member="BLE_GATTS_EVT_SYS_ATTR_MISSING" ref="gga80155586fa275b28773c9b203f52cabaae3776204f11a583e105aed0e477601da" args="" -->BLE_GATTS_EVT_SYS_ATTR_MISSING</em>&nbsp;</td><td>
<p>A persistent system attribute access is pending, awaiting a <a class="el" href="group___b_l_e___g_a_t_t_s.html#ga65ae169e49530eb2fa4bf73053060a13" title="Update persistent system attribute info.">ble_gatts_sys_attr_set()</a>. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaaf6a065c5c7e0682989ddd6cc557e0ffa"></a><!-- doxytag: member="BLE_GATTS_EVT_HVC" ref="gga80155586fa275b28773c9b203f52cabaaf6a065c5c7e0682989ddd6cc557e0ffa" args="" -->BLE_GATTS_EVT_HVC</em>&nbsp;</td><td>
<p>Handle Value Confirmation. </p>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="ble__gatts_8h_source.html#l00198">198</a> of file <a class="el" href="ble__gatts_8h_source.html">ble_gatts.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga49a333294ed30895dfdc8b699b41e07c"></a><!-- doxytag: member="ble_gatts.h::ble_gatts_db_load" ref="ga49a333294ed30895dfdc8b699b41e07c" args="(uint32_t len, uint8_t const *const p_data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_gatts_db_load </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *const&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Load a preconfigured GATT attribute database. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Not yet implemented.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Length in bytes of the buffer data. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the beginning of the buffer containing the raw database data. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NRF_ERROR_NOT_SUPPORTED </dd></dl>

</div>
</div>
<a class="anchor" id="ga5e8270fe6dfa01e446be17b48fe81e2a"></a><!-- doxytag: member="ble_gatts.h::ble_gatts_service_add" ref="ga5e8270fe6dfa01e446be17b48fe81e2a" args="(uint8_t type, ble_uuid_t const *const p_uuid, uint16_t *const p_handle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_gatts_service_add </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structble__uuid__t.html">ble_uuid_t</a> const *const&#160;</td>
          <td class="paramname"><em>p_uuid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *const&#160;</td>
          <td class="paramname"><em>p_handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a service declaration to the local server database. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The Service Changed characteristic is currently not implemented. Thus, to conform to the Blutetooth specifications, the application must not add, modify or remove services, characteristics or descriptors while the device is connected or bonded to another device.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>Toggles between primary and secondary services, see <a class="el" href="group___b_l_e___g_a_t_t_s___s_v_c___t_y_p_e_s.html">GATT Server Service Types.</a>. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_uuid</td><td>Pointer to service UUID. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">p_handle</td><td>Pointer to a 16-bit word where the assigned handle will be stored.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__nrf__error.html#ga7e6367efeaac363d8cf024940b4ec123">NRF_SUCCESS</a> Success. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gabc562e4ddfe2f427666a3acdd0b469a3">NRF_ERROR_INVALID_ADDR</a> Invalid pointer supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga0a5831cf5092e0dd43a01869676ee076">NRF_ERROR_INVALID_PARAM</a> Invalid parameter(s) supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga85125dae5d7e9d4b9964acbc13f641b3">NRF_ERROR_FORBIDDEN</a> Forbidden value supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga7ef4d466b79b31c6325f8b7af5d4f75f">NRF_ERROR_NO_MEM</a> Not enough memory to complete operation. </dd></dl>

</div>
</div>
<a class="anchor" id="ga553f8deef66ea239ced4fe7efc82106b"></a><!-- doxytag: member="ble_gatts.h::ble_gatts_include_add" ref="ga553f8deef66ea239ced4fe7efc82106b" args="(uint16_t service_handle, uint16_t inc_svc_handle, uint16_t *const p_include_handle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_gatts_include_add </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>service_handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>inc_svc_handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *const&#160;</td>
          <td class="paramname"><em>p_include_handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add an include declaration to the local server database. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The Service Changed characteristic is currently not implemented. Thus, to conform to the Blutetooth specifications, the application must not add, modify or remove services, characteristics or descriptors while the device is connected or bonded to another device.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">service_handle</td><td>Handle of the service where the included service is to be placed, if BLE_GATTS_HANDLE_INVALID is used, it will be placed sequentially. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">inc_svc_handle</td><td>Handle of the included service. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">p_include_handle</td><td>Pointer to a 16-bit word where the assigned handle will be stored.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__nrf__error.html#ga7e6367efeaac363d8cf024940b4ec123">NRF_SUCCESS</a> Success. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gabc562e4ddfe2f427666a3acdd0b469a3">NRF_ERROR_INVALID_ADDR</a> Invalid pointer supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga0a5831cf5092e0dd43a01869676ee076">NRF_ERROR_INVALID_PARAM</a> Invalid parameter(s) supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gaf0aff2ba7864b34a36b4a96986e1851e">NRF_ERROR_INVALID_STATE</a> Invalid state to perform operation. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga85125dae5d7e9d4b9964acbc13f641b3">NRF_ERROR_FORBIDDEN</a> Forbidden value supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga7ef4d466b79b31c6325f8b7af5d4f75f">NRF_ERROR_NO_MEM</a> Not enough memory to complete operation. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga349d25ada15be023e0d507f45ada682c">NRF_ERROR_NOT_FOUND</a> Attribute not found. </dd></dl>

</div>
</div>
<a class="anchor" id="gae4a1d9149f4531d66d06bf289886106d"></a><!-- doxytag: member="ble_gatts.h::ble_gatts_characteristic_add" ref="gae4a1d9149f4531d66d06bf289886106d" args="(uint16_t service_handle, ble_gatts_char_md_t const *const p_char_md, ble_gatts_attr_t const *const p_attr_char_value, ble_gatts_char_handles_t *const p_handles)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_gatts_characteristic_add </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>service_handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structble__gatts__char__md__t.html">ble_gatts_char_md_t</a> const *const&#160;</td>
          <td class="paramname"><em>p_char_md</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structble__gatts__attr__t.html">ble_gatts_attr_t</a> const *const&#160;</td>
          <td class="paramname"><em>p_attr_char_value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structble__gatts__char__handles__t.html">ble_gatts_char_handles_t</a> *const&#160;</td>
          <td class="paramname"><em>p_handles</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a characteristic declaration, a characteristic value declaration and optional characteristic descriptor declarations to the local server database. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The Service Changed characteristic is currently not implemented. Thus, to conform to the Blutetooth specifications, the application must not add, modify or remove services, characteristics or descriptors while the device is connected or bonded to another device.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">service_handle</td><td>Handle of the service where the characteristic is to be placed, if BLE_GATTS_HANDLE_INVALID is used, it will be placed sequentially. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_char_md</td><td>Characteristic metadata. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_attr_char_value</td><td>Pointer to the attribute structure corresponding to the characteristic value. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">p_handles</td><td>Pointer to the structure where the assigned handles will be stored.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__nrf__error.html#ga7e6367efeaac363d8cf024940b4ec123">NRF_SUCCESS</a> Success. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gabc562e4ddfe2f427666a3acdd0b469a3">NRF_ERROR_INVALID_ADDR</a> Invalid pointer supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga0a5831cf5092e0dd43a01869676ee076">NRF_ERROR_INVALID_PARAM</a> Invalid parameter(s) supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gaf0aff2ba7864b34a36b4a96986e1851e">NRF_ERROR_INVALID_STATE</a> Invalid state to perform operation. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga85125dae5d7e9d4b9964acbc13f641b3">NRF_ERROR_FORBIDDEN</a> Forbidden value supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga7ef4d466b79b31c6325f8b7af5d4f75f">NRF_ERROR_NO_MEM</a> Not enough memory to complete operation. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga4c61f2b54667506e90cc296721b2e658">NRF_ERROR_DATA_SIZE</a> Invalid data size(s) supplied. </dd></dl>

</div>
</div>
<a class="anchor" id="ga4bb7f2d804e7416d47ba64f434ac1243"></a><!-- doxytag: member="ble_gatts.h::ble_gatts_descriptor_add" ref="ga4bb7f2d804e7416d47ba64f434ac1243" args="(uint16_t char_handle, ble_gatts_attr_t const *const p_attr, uint16_t *const p_handle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_gatts_descriptor_add </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>char_handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structble__gatts__attr__t.html">ble_gatts_attr_t</a> const *const&#160;</td>
          <td class="paramname"><em>p_attr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *const&#160;</td>
          <td class="paramname"><em>p_handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a descriptor to the local server database. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The Service Changed characteristic is currently not implemented. Thus, to conform to the Blutetooth specifications, the application must not add, modify or remove services, characteristics or descriptors while the device is connected or bonded to another device.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">char_handle</td><td>Handle of the characteristic where the descriptor is to be placed, if BLE_GATTS_HANDLE_INVALID is used, it will be placed sequentially. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_attr</td><td>Pointer to the attribute structure. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">p_handle</td><td>Pointer to a 16-bit word where the assigned handle will be stored. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__nrf__error.html#ga7e6367efeaac363d8cf024940b4ec123">NRF_SUCCESS</a> Success. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gabc562e4ddfe2f427666a3acdd0b469a3">NRF_ERROR_INVALID_ADDR</a> Invalid pointer supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga0a5831cf5092e0dd43a01869676ee076">NRF_ERROR_INVALID_PARAM</a> Invalid parameter(s) supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gaf0aff2ba7864b34a36b4a96986e1851e">NRF_ERROR_INVALID_STATE</a> Invalid state to perform operation. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga85125dae5d7e9d4b9964acbc13f641b3">NRF_ERROR_FORBIDDEN</a> Forbidden value supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga7ef4d466b79b31c6325f8b7af5d4f75f">NRF_ERROR_NO_MEM</a> Not enough memory to complete operation. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga4c61f2b54667506e90cc296721b2e658">NRF_ERROR_DATA_SIZE</a> Invalid data size(s) supplied. </dd></dl>

</div>
</div>
<a class="anchor" id="gafa770e6b8477caf6d46296fe46dd949e"></a><!-- doxytag: member="ble_gatts.h::ble_gatts_md_set" ref="gafa770e6b8477caf6d46296fe46dd949e" args="(uint16_t handle, ble_gatts_attr_md_t const *const p_attr_md)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_gatts_md_set </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structble__gatts__attr__md__t.html">ble_gatts_attr_md_t</a> const *const&#160;</td>
          <td class="paramname"><em>p_attr_md</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the metadata for a given attribute. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">handle</td><td>Attribute handle. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_attr_md</td><td>Pointer to the desired attribute metadata.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__nrf__error.html#ga7e6367efeaac363d8cf024940b4ec123">NRF_SUCCESS</a> Success. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gabc562e4ddfe2f427666a3acdd0b469a3">NRF_ERROR_INVALID_ADDR</a> Invalid pointer supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga0a5831cf5092e0dd43a01869676ee076">NRF_ERROR_INVALID_PARAM</a> Invalid parameter(s) supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga349d25ada15be023e0d507f45ada682c">NRF_ERROR_NOT_FOUND</a> Attribute not found. </dd></dl>

</div>
</div>
<a class="anchor" id="gad08012420fc5b8b7dbfd2ced37ab8e44"></a><!-- doxytag: member="ble_gatts.h::ble_gatts_md_get" ref="gad08012420fc5b8b7dbfd2ced37ab8e44" args="(uint16_t handle, ble_gatts_attr_md_t *const p_attr_md)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_gatts_md_get </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structble__gatts__attr__md__t.html">ble_gatts_attr_md_t</a> *const&#160;</td>
          <td class="paramname"><em>p_attr_md</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the metadata for a given attribute. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">handle</td><td>Attribute handle. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">p_attr_md</td><td>Pointer to the structure to be filled in with data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__nrf__error.html#ga7e6367efeaac363d8cf024940b4ec123">NRF_SUCCESS</a> Success. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gabc562e4ddfe2f427666a3acdd0b469a3">NRF_ERROR_INVALID_ADDR</a> Invalid pointer supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga349d25ada15be023e0d507f45ada682c">NRF_ERROR_NOT_FOUND</a> Attribute not found. </dd></dl>

</div>
</div>
<a class="anchor" id="ga4267755972361d620ae47d791feec4a5"></a><!-- doxytag: member="ble_gatts.h::ble_gatts_value_set" ref="ga4267755972361d620ae47d791feec4a5" args="(uint16_t handle, uint16_t offset, uint16_t *const p_len, uint8_t const *const p_value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_gatts_value_set </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *const&#160;</td>
          <td class="paramname"><em>p_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *const&#160;</td>
          <td class="paramname"><em>p_value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the value of a given attribute. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The Service Changed characteristic is currently not implemented. Thus, to conform to the Blutetooth specifications, the application must not add, modify or remove services, characteristics or descriptors while the device is connected or bonded to another device.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">handle</td><td>Attribute handle. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>Offset in bytes to write from. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">p_len</td><td>Length in bytes to be written, length in bytes written after successful return. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_value</td><td>Pointer to a buffer (at least len bytes long) containing the desired attribute value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__nrf__error.html#ga7e6367efeaac363d8cf024940b4ec123">NRF_SUCCESS</a> Success. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gabc562e4ddfe2f427666a3acdd0b469a3">NRF_ERROR_INVALID_ADDR</a> Invalid pointer supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga0a5831cf5092e0dd43a01869676ee076">NRF_ERROR_INVALID_PARAM</a> Invalid parameter(s) supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga349d25ada15be023e0d507f45ada682c">NRF_ERROR_NOT_FOUND</a> Attribute not found. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga4c61f2b54667506e90cc296721b2e658">NRF_ERROR_DATA_SIZE</a> Invalid data size(s) supplied. </dd></dl>

</div>
</div>
<a class="anchor" id="ga9112e57e30d9d78b9c5682c55f1b502e"></a><!-- doxytag: member="ble_gatts.h::ble_gatts_value_get" ref="ga9112e57e30d9d78b9c5682c55f1b502e" args="(uint16_t handle, uint16_t offset, uint16_t *const p_len, uint8_t *const p_data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_gatts_value_get </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *const&#160;</td>
          <td class="paramname"><em>p_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *const&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the value of a given attribute. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">handle</td><td>Attribute handle. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>Offset in bytes to read from. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">p_len</td><td>Length in bytes to be read, length in bytes read after successful return. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">p_data</td><td>Pointer to a buffer (at least len bytes long) where to store the attribute value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__nrf__error.html#ga7e6367efeaac363d8cf024940b4ec123">NRF_SUCCESS</a> Success. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gabc562e4ddfe2f427666a3acdd0b469a3">NRF_ERROR_INVALID_ADDR</a> Invalid pointer supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga349d25ada15be023e0d507f45ada682c">NRF_ERROR_NOT_FOUND</a> Attribute not found. </dd></dl>

</div>
</div>
<a class="anchor" id="gaab41731020dbcc6b9b561d8129689308"></a><!-- doxytag: member="ble_gatts.h::ble_gatts_hvx" ref="gaab41731020dbcc6b9b561d8129689308" args="(uint16_t conn_handle, ble_gatts_hvx_params_t const *const p_hvx_params)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_gatts_hvx </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>conn_handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structble__gatts__hvx__params__t.html">ble_gatts_hvx_params_t</a> const *const&#160;</td>
          <td class="paramname"><em>p_hvx_params</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Notify or Indicate an attribute value. </p>
<p>This function checks for the relevant Client Characteristic Configuration descriptor value to verify that the relevant operation (notification or indication) has been enabled by the client. It is also able to update the attribute value before issuing the PDU, so that the application can atomically perform a value update and a server initiated transaction with a single API call. Notice: A failing call to ble_gatts_hvx might update the database, depending on the ERROR returned.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">conn_handle</td><td>Connection handle. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_hvx_params</td><td>Pointer to an HVx parameters structure. If the p_data member contains a non-NULL pointer the attribute value will be updated with the contents pointed by it before sending the notification or indication.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__nrf__error.html#ga7e6367efeaac363d8cf024940b4ec123">NRF_SUCCESS</a> Success. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gabc562e4ddfe2f427666a3acdd0b469a3">NRF_ERROR_INVALID_ADDR</a> Invalid pointer supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga0a5831cf5092e0dd43a01869676ee076">NRF_ERROR_INVALID_PARAM</a> Invalid parameter(s) supplied. </dd>
<dd>
<a class="el" href="group__ble__err.html#ga6346bb5ec3bcd4a25332dc782c1b7e01">BLE_ERROR_INVALID_ATTR_HANDLE</a> Invalid attribute handle(s) supplied. </dd>
<dd>
BLE_ERROR_GATTS_INVALID_ATTR_TYPE Invalid attribute type(s) supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gaf0aff2ba7864b34a36b4a96986e1851e">NRF_ERROR_INVALID_STATE</a> Invalid state to perform operation. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga349d25ada15be023e0d507f45ada682c">NRF_ERROR_NOT_FOUND</a> Attribute not found. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga5d2d8608f6d6a0329f58961a969e946e">NRF_ERROR_BUSY</a> Procedure already in progress. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga4c61f2b54667506e90cc296721b2e658">NRF_ERROR_DATA_SIZE</a> Invalid data size(s) supplied. </dd>
<dd>
BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing. </dd></dl>

</div>
</div>
<a class="anchor" id="ga6a775b4839508c4ea02d38589980e9f4"></a><!-- doxytag: member="ble_gatts.h::ble_gatts_rw_op_reply" ref="ga6a775b4839508c4ea02d38589980e9f4" args="(uint16_t conn_handle, ble_gatts_rw_op_reply_params_t const *const p_rw_op_reply_params)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_gatts_rw_op_reply </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>conn_handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structble__gatts__rw__op__reply__params__t.html">ble_gatts_rw_op_reply_params_t</a> const *const&#160;</td>
          <td class="paramname"><em>p_rw_op_reply_params</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Respond to a request for a deferred/persistent attribute valeu. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">conn_handle</td><td>Connection handle. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_rw_op_reply_params</td><td>Pointer to a structure with the attribute provided by the application.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__nrf__error.html#gaacf52836cc3860c5ffd4e129f725f138">NRF_ERROR_NOT_SUPPORTED</a> Not supported. </dd></dl>

</div>
</div>
<a class="anchor" id="ga65ae169e49530eb2fa4bf73053060a13"></a><!-- doxytag: member="ble_gatts.h::ble_gatts_sys_attr_set" ref="ga65ae169e49530eb2fa4bf73053060a13" args="(uint16_t conn_handle, uint8_t const *const p_sys_attr_data, uint16_t len)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_gatts_sys_attr_set </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>conn_handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *const&#160;</td>
          <td class="paramname"><em>p_sys_attr_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Update persistent system attribute info. </p>
<p>Supply to the stack information about persistent system attributes. This call is legal in the connected state only, and is usually made immediately after a connection is established and the bond identified. usually as a response to a BLE_GATTS_EVT_SYS_ATTR_MISSING.</p>
<p>p_sysattrs may point directly to the application's flashed copy of the struct. If the pointer is NULL, the system attribute info is initialized, assuming that the application does not have any previously saved data for this bond.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">conn_handle</td><td>Connection handle. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_sys_attr_data</td><td>Pointer to a saved copy of system attributes supplied to the stack, or NULL. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Size of data pointed by p_sys_attr_data, in octets.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__nrf__error.html#ga7e6367efeaac363d8cf024940b4ec123">NRF_SUCCESS</a> Success. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gaca6d57e218563351e7abdbdebb049f69">NRF_ERROR_INVALID_DATA</a> Invalid data type(s) supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga7ef4d466b79b31c6325f8b7af5d4f75f">NRF_ERROR_NO_MEM</a> Not enough memory to complete operation. </dd></dl>

</div>
</div>
<a class="anchor" id="gaef948f6aafa9e8a728a948bec76e8208"></a><!-- doxytag: member="ble_gatts.h::ble_gatts_sys_attr_get" ref="gaef948f6aafa9e8a728a948bec76e8208" args="(uint16_t conn_handle, uint8_t *const p_sys_attr_data, uint16_t *const p_len)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_gatts_sys_attr_get </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>conn_handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *const&#160;</td>
          <td class="paramname"><em>p_sys_attr_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *const&#160;</td>
          <td class="paramname"><em>p_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve persistent system attribute info from softdevice. </p>
<p>This call is used to retrieve information about values to be stored perisistently by the application after a connection has been terminated. When a new connection is made to the same bond, the values should be restored using <a class="el" href="group___b_l_e___g_a_t_t_s.html#ga65ae169e49530eb2fa4bf73053060a13" title="Update persistent system attribute info.">ble_gatts_sys_attr_set()</a>. The data should be be read before any new advertising is started, or any new connection established. The connection handle for the previous now defunct connection will remain valid until a new one is created to allow this API call to refer to it.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">conn_handle</td><td>Connection handle of the recently terminated connection. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_sys_attr_data</td><td>Pointer to a buffer where updated information about system attributes will be filled in. NULL can be provided to obtain the length of the data </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">p_len</td><td>Size of application buffer if p_sys_attr_data is not NULL. Unconditially updated to actual length of system attribute data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__nrf__error.html#ga7e6367efeaac363d8cf024940b4ec123">NRF_SUCCESS</a> Success. </dd>
<dd>
<a class="el" href="group__nrf__error.html#gabc562e4ddfe2f427666a3acdd0b469a3">NRF_ERROR_INVALID_ADDR</a> Invalid pointer supplied. </dd>
<dd>
<a class="el" href="group__nrf__error.html#ga4c61f2b54667506e90cc296721b2e658">NRF_ERROR_DATA_SIZE</a> Invalid data size(s) supplied. </dd></dl>

</div>
</div>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">
      Copyright &copy 2006-2011 <a href="http://www.nordicsemi.no" style="text-decoration:none">Nordic Semiconductor</a>.
      All Rights Reserved.
      <a href="disclaimer.html">Disclaimer</a>
    </li>
   </ul>
 </div>


</body>
</html>
